do return end

-- Namespace
	local _,mod = ...


-- Object ref
	local RAID_CLASS_COLORS = CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS


-- Locals
	local smfont = {mod.path..'media\\bavaria.ttf',8,'OUTLINEMONOCHROME'}
	local lgfont = {mod.path..'media\\tempesta.ttf',16,'OUTLINEMONOCHROME'}
	
	local white = { r = 1, g = 1, b = 1 }
	
	local function abbrev(text)
		text = text:sub(1,1)
		text = text..'.'
		return text
	end


-- Base frame
	local focustarget,events = mod:UF('focustarget')
		focustarget:SetFrameLevel(1)
		focustarget:SetHeight(12) focustarget:SetWidth(120)
		focustarget:SetPoint('TOPRIGHT',UIParent,'CENTER',-253,57)
		
		focustarget:SetScript('OnEnter',function(self)
			GameTooltip_SetDefaultAnchor(GameTooltip,self)
			GameTooltip:SetUnit(self.unit)
		end)
		focustarget:SetScript('OnLeave',function(self)
			GameTooltip:ClearLines()
			GameTooltip:Hide()
		end)


-- Name
	local nametext = focustarget:CreateFontString(nil,'OVERLAY')
		nametext:SetAllPoints(true)
		nametext:SetFont(unpack(smfont))
		nametext:SetJustifyH('RIGHT')
		nametext:SetJustifyV('TOP')
		nametext:SetNonSpaceWrap(false)
		nametext:Listen('name',function(self,name,realm)
			name = name:gsub('(%S+) ',abbrev)
			if UnitCanAttack('player','focustarget') then
				name = name..' |cff993333<|r'
			else
				name = name..' |cffffffff<|r'
			end
			if realm then
				name = '(*) '..name
			end
			self:SetText(name)
		end)
		nametext:Listen('class',function(self,_,enclass)
			local color = RAID_CLASS_COLORS[enclass] or white
			self:SetTextColor(color.r,color.g,color.b)
		end)
		focustarget.nametext = nametext
